package com.saturday.uid;

/**
 * Represents a unique id generator.
 *
 */
public interface UidGenerator {

    /**
     * Get a unique ID
     *
     * @return UID
     */
    long getUID();

    /**
     * 获取一个指定前缀的唯一编号
     *
     * @param prefix
     * @return
     */
    String getUID(String prefix);

    /**
     * Parse the UID into elements which are used to generate the UID. <br>
     * Such as timestamp & workerId & sequence...
     *
     * @param uid
     * @return Parsed info
     */
    String parseUID(long uid);

}
